Scatterometry overlay (SCOL) metrology is used to measure overlay between wafer layers from the phases of diffraction orders generated by the individual wafer layers in the SCOL targets. The derivation of the overlay is based on an algorithmic processing of the measurements which takes into account the optical interaction between the illumination, the target structure and the detection system.